<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@page import="com.lavegue.model.Area" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
<head>
<base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>发送系统消息</title>

<meta http-equiv="pragma" content="no-cache">
	<script type='text/javascript' src='dwr/interface/userdwr.js'></script>
     <script type='text/javascript' src='dwr/interface/areadwr.js'></script>
	<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
	<script type='text/javascript' src='js/jquery.validate.min.js'></script>
 	<script type='text/javascript' src='js/common.js'></script>
	<meta http-equiv="pragma" content="no-cache" />
	 <script type='text/javascript' src='<%=basePath %>/dwr/engine.js'></script>
	 <script type='text/javascript' src='<%=basePath %>/dwr/util.js'></script>
	<link href="images/css.css"  rel="stylesheet" type="text/css" />
      <link href="backStageManage/bs.css"  rel="stylesheet" type="text/css" />
	<script language="javascript" type="text/javascript" src="<%=basePath %>/date/WdatePicker.js"></script>


<!-- 效验数据 -->
<script type="text/javascript">
function checkValid(){
        var sname=$.trim($("#sendName").val());    //发送者
		var title = $.trim($("#sendtitle").val());  //标题
		var content = $.trim($("#sendContent").val()); //内容
		
		if(sname==""){  
			$("#nameSpan").html("请输入发送者名称");
			$("#sendName").focus();
			return false;
		}
       if(title==""){  
			$("#nameSpan").html("");
			$("#titleSpan").html("请输入标题");
			$("#sendtitle").focus();
			return false;
		}
		
		if(content==""){  
			$("#titleSpan").html("");
			$("#contentSpan").html("请输入内容");
			$("#sendContent").focus();
			return false;
		}
//	var allchk = document.getElementById("allchk"); //全选复选框按钮
	var recevId = document.getElementById("receverId");
	if(recevId.checked == false){  //全部用户没有勾上
		var fxChVal = duoXuanChk();  //如果全选复选框 按钮勾上选了，又去掉了一个复选框的选择，最终调用duoXuanChk()方法
		if(fxChVal == ""){
			alert("请选择用户接收者.");
			return false;
		}
	}
	
 $("#addSysMes").submit();
}

//点击复选框[全部用户]事件
function checkHidden(){
	var ch = document.getElementsByName("chbox");
//	var allchk = document.getElementById("allqxChk"); //全选按钮复选框
	var allchk = document.getElementsByName("allchk"); //全选按钮复选框
  	var hqValue="";
    var receverId = document.getElementById("receverId");
 // alert("全部用户="+receverId.checked);
 //alert("allchk="+allchk.checked);
  if(receverId.checked == true){ //如果选择全部用户
 	//	alert("ch.length="+ch.length);
 		for(i=0;i < ch.length;i++) {
 	//	alert("i="+i);
			//	alert("Chk_checked="+ch[i].checked); 
			ch[i].disabled = true; //设置复选框不可编辑
			//alert("ch"+[i]+"="+ch[i].disabled);
			if(ch[i].checked == true){
				ch[i].checked = false;  //设置为复选框不选中
			}
		}
		
		for(j=0;j < allchk.length;j++){
			if(allchk[j].checked == true){
				allchk[j].checked = false;  //设置为复选框不选中
			}
			allchk[j].disabled = true; //设置全选按钮不可编辑
		}
		
		$("#receverId").val(0);  //给隐藏域赋值	
	//	alert("rID="+$("#receverId").val());	
  }else{
  		for(j=0;j <ch.length;j++) {
			ch[j].disabled = false; //设置复选框可编辑
		}
		for(j=0;j < allchk.length;j++){
			if(allchk[j].checked == true){
				allchk[j].checked = false;  //设置为复选框不选中
			}
			allchk[j].disabled = false; //设置全选按钮可编辑
		}
		$("#receverId").val("");  //给隐藏域赋值	
  }
//	alert("receverId:="+$("#receverId").val());
}
//点击复选框[全选]事件
 function quanXuanChk(){
 	var ch = document.getElementsByName("chbox");
 	var allchk = document.getElementsByName("allchk"); //全选按钮复选框

	var hqValue="";
	
 	for(i=0;i <allchk.length;i++) {
 		//alert(">>>>"+allchk[i].checked);
 		if(allchk[i].checked == true){ //如果点击了全选按钮，就标记着复选框全部选中
			for(i=0;i <ch.length;i++) {
			//	alert("Chk_checked="+ch[i].checked); 
				if(ch[i].checked == false){
				//	alert("设置为复选框选中");
					ch[i].checked = true;  //设置为复选框选中
					if(i == (ch.length-1)){
						hqValue = hqValue+ch[i].value;
					 }else{
					    hqValue = (hqValue+ch[i].value)+"_";
					 }
				//	alert(">>"+hqValue);
				}
			}
			 $("#usersId").val(hqValue);  //给隐藏域赋值		
		}else{
	 		for(i=0;i <ch.length;i++) {
				//alert("Chk_checked="+ch[i].checked); 
				if(ch[i].checked == true ){
				//	alert("设置为不选中");
					ch[i].checked = false;  //设置为复选框不选中
				}
			}
	 	}  
 	} 
 	$("#receverId").val("");  //给隐藏域赋值
 	  //	alert("MM==="+$("#userId").val());  
 	  //document.getElementById("userId").value= hqValue;
 }

//点击发送事件调用
 function duoXuanChk(){ //复选框选择多个
 	var ch = document.getElementsByName("chbox");
	var hqValue="";
			for(i=0;i < ch.length;i++) {
			//	alert("Chk_checked="+ch[i].checked); 
				if(ch[i].checked == true){				
					hqValue = (hqValue+ch[i].value)+"_";
				//	alert(">>"+hqValue);
				}
			 }
			 if(hqValue !=""){
			 	//alert(">>"+hqValue);
			    $("#usersId").val(hqValue);  //给隐藏域赋值
			 }
	$("#receverId").val("");  //给隐藏域赋值
 	  //	alert("MM==="+$("#userId").val());  
 	  //document.getElementById("userId").value= hqValue;
 	  return hqValue;
 }

</script>

<script type="text/javascript">
function serachInfoSubmit(){
	if(!checkVal()){
		return false;
	}else{
	//	document.cxFrm.submit();
		document.addSysMes.action ="sysMes!findAllUserInfo.action";
		document.addSysMes.submit();
	}
}

function checkVal(){
//		var beginTime= $.trim($("#beginTime").val());
//		var endTime= $.trim($("#endTime").val());
		var account = $.trim($("#account").val());   //手机号
		var balBegin = $.trim($("#accBalBegin").val());  //账户开始余额
		var balEnd = $.trim($("#accBalEnd").val());  //账户结束余额
		var userName = $.trim($("#userName").val()); //真实姓名 
		//所在地区的值
		var province = $.trim($("#province").val()); //获取省份值
		var city = $.trim($("#city").val()); //获取市区值
		var area = $.trim($("#area").val()); //获取区域值
	/*	
		if(beginTime !="" && endTime !=""){
			if(beginTime > endTime){
				$("#errorSpan").html("&nbsp;&nbsp;选择的开始时间不能大于结束时间.");
				return false;
			}else{
				$("#errorSpan").html("");
			}
		}else{
				$("#errorSpan").html("");
		}*/
		
		if(userName !="" && userName.length > 0){
			   		//----以下是效验真实姓名是否是中文
			if(isIllegalChar(userName)){
					$("#errorSpan").html("&nbsp;&nbsp;姓名包含了非法字符.");
					$("#userName").select();
					return false;
			}
		}else{
			$("#errorSpan").html("");
		}
			//----以下是效验手机号码
			if(account != ""){
				if(!isValidMobile(account)){
				$("#errorSpan").html("&nbsp;&nbsp;输入的手机号码有误.");
				$("#account").select();
				return false;
				}else{
					$("#errorSpan").html("");
				}
			}else{
				$("#errorSpan").html("");
			}
			
			
			 //------------以下是效验用户金额的正确性
			 if(balBegin != "" && balEnd != ""){
			 	if(!isCurrency(balBegin) || !isCurrency(balEnd)){
					$("#errorSpan").html("&nbsp;输入的账户余额有误.");
					//$("#balance").select();
					return false;
				}else{
					$("#errorSpan").html("");
				}
				if(parseFloat(balBegin) > parseFloat(balEnd)){
					$("#errorSpan").html("&nbsp;开始余额不能大于结束余额.");
					return false;
				}else{
					$("#errorSpan").html("");
				}
			 }else{
			 	if(balBegin !=""){
			 		if(!isCurrency(balBegin)){
			 			$("#errorSpan").html("&nbsp;输入的账户余额有误.");
						return false;
			 		}else{
						$("#errorSpan").html("");
					}
			 	}
			 	if(balEnd !=""){
			 		if(!isCurrency(balEnd)){
			 			$("#errorSpan").html("&nbsp;输入的账户余额有误.");
						return false;
			 		}else{
						$("#errorSpan").html("");
					}
			 	}
			 	
				$("#errorSpan").html("");
			 }
			
		if(province != 0){ //省份
			//	$("#errorSpan").html("请选择所在地区.");
			$("#errorSpan").html("");
			$("#userProvince").val(province);
		}else{
			$("#errorSpan").html("");
		}
		if(city!=0){ //城市
			$("#errorSpan").html("");
			$("#userCity").val(city);
		}	
		if(area!=0){ //区县
			$("#errorSpan").html("");
			$("#userZone").val(area);
		}
			var  pp = $.trim($("#userProvince").val());
			var  City = $.trim($("#userCity").val());
			//	alert("Province="+pp+",city="+City);	
		return true;
}

function isIllegalChar(str) {
	var voidChar = /[@#\$%\^&\*\+\?:|.!~=>`<]+/g;
	return voidChar.test(str);
}
function isCurrency(currency){
 	var curr = /^\d+(\.\d+)?$/;
 	return curr.test(currency);
}
/**
 * 判断是不是有效的手机号码
 * 格式正确返回true,否则false.
 */
function isValidMobile(mobile) {
    //var pattern = /^((\(\d{2,3}\))|(\d{3}\-))?13\d{9}$/;
    var pattern = /^((13[0-9]{1}|15[0-9]{1}|18[0-9]{1}|)+\d{8})$/;   
    return pattern.test(mobile);
}

//转至多少页码
function changePage(listId)
{
	//alert(listId);
	document.location.href="sysMes!findAllUserInfo.action?pageNo="+listId;
}

//省份按钮事件
function changeProvinceHandler() {
	//获取省份下拉框的值
	var province = $("#province").val();
//	alert("province=="+province);
	//如果选择了"请选择这个项" (0表示选择了这个项)
	if (province == 0) {
		//删除市和区域下拉的全部选项
		DWRUtil.removeAllOptions("city");
		DWRUtil.addOptions("city", [{"id":0,"name":"请选择..." }], "id", "name");
		DWRUtil.removeAllOptions("area");
		DWRUtil.addOptions("area", [{"id":0,"name":"请选择..." }], "id", "name");
		return;
	} 		
	//删除市下拉的全部选项
	DWRUtil.removeAllOptions("city");
	//根据所选择的省从后台获取相关的市
	areadwr.findAreaByParendIdAndlvType(province, <%= Area.AreaType.CITY%>, function(data){
	DWRUtil.addOptions("city", [{"id":0,"name":"请选择..." }], "id", "name");
	DWRUtil.addOptions("city", data, "id", "name");   //把data数据填充到城市下拉框
	DWRUtil.removeAllOptions("area");   //清除区域的初始值
	DWRUtil.addOptions("area", [{"id":0,"name":"请选择" }], "id", "name");
	});
	
}

//城市按钮事件
function changeCityHandler() {
	var city = $("#city").val();
	//如果选择了"请选择这个项"
	if (city == 0) {
		//删除区下拉的全部选项
		DWRUtil.removeAllOptions("area");
		DWRUtil.addOptions("area", [{"id":0,"name":"请选择..." }], "id", "name");
		return;
	} 
				
	//删除区域下拉的全部选项
	DWRUtil.removeAllOptions("area");
	//根据所选择的市从后台获取相关的区
	areadwr.findAreaByParendIdAndlvType(city, <%= Area.AreaType.AREA%>, function(data) {
	DWRUtil.addOptions("area", [{"id":0,"name":"请选择..." }], "id", "name");
	DWRUtil.addOptions("area", data, "id", "name"); //把data数据填充到区域下拉框
	});
}

</script>

</head>
<body style="margin:0px; text-align:center;font-size:12px;" bgcolor="#F1F1F1" >
<div id="top">
 	<!-- 头部-->
 	<%@include file="mainTop.jsp"%>
</div>
<div id="top2"></div>

<!-- 中间-->
<div id="main1">
<!-- 左边-->
 <%@include file="mainLeft.jsp"%>
   <div class="mainr2"></div>
<s:form action="sysMes!addSysMes.action"  name="addSysMes" id="addSysMes" method="post">
<table>
 <tr>
 	<td>
 		<table width="626" height="229" border="0" align="left" bgcolor="#FFFFFF" style="font-size:12px;">
			  <tr>
			    <td height="33" align="right">发送者：</td>
			    <td width="274">
			    	<s:textfield name="sendName" id="sendName" size="15" />
			     <%-- <input name="sendName" type="text" id="sendName" size="15">--%>&nbsp;<span style="color:red">*</span>
			   </td>
			    <td width="203"><span style="color:red"  id="nameSpan"></span> </td>
			  </tr>
			   <tr>
			    <td height="23" align="right">接收者：</td>
			    <td>
			     <%--
			     <s:select list="listUser" listKey="id" listValue="userName" headerKey="0" headerValue="===全部用户===" id="receverId" name="receverId">
			     </s:select> --%>
			     <input type="checkbox" name="receverId" id="receverId" value="" onclick="checkHidden();" />&nbsp;全部用户
			     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			  	 <input type="button" name="searchUser" id="searchUser" onclick="javascript:searchSubmit();" value="查看用户">
			<%--	 <s:submit name="searchUser" id="searchUser" onclick="javascript:searchSubmit();" value="搜索查询" />--%>
				</td>
			    <td>&nbsp;</td>
			  </tr>
			  <tr>
			    <td height="29" align="right">标&nbsp;&nbsp;&nbsp; 题：</td>
			    <td>
			    	<s:textfield name="sendtitle" id="sendtitle" size="24" />
			    	<%--<input name="sendtitle" type="text" id="sendtitle" size="24">--%>&nbsp;<span style="color:red">*</span>
			    </td>
			    <td><span style="color:red"  id="titleSpan"></span></td>
			  </tr>
			  <tr>
			    <td height="107" align="right">内 &nbsp;&nbsp;&nbsp;容：</td>
			    <td>
			    	<s:textarea name="sendContent" cols="30" rows="6" id="sendContent"/>
			    	<%--<textarea name="sendContent" cols="30" rows="6" id="sendContent"></textarea>--%>&nbsp;<span style="color:red">*</span></td>
			    <td><span style="color:red"  id="contentSpan"></span></td>
			  </tr>

			        <%-- 把所有全选的值赋值给隐藏域，提交到后台获取 --%>
			        <s:hidden name="usersId" id="usersId" value="" />
			        
			        <input type="hidden" name="flgDivDisp" id="flgDivDisp" value="<s:property value="flagDivDisp"/>" />
			   <tr>
			    <td height="25" colspan="3" align="center"><input type="button" name="Submit" value="发 送 信 息" onClick="javascript:checkValid();"></td>
			    </tr>
		</table>
    </td>
 </tr>
 <tr>
 	<td>&nbsp;</td>
 </tr>
 <tr>
   <td>
 	<div id="userListMain" style="display:none;" >
	<%--begin 用户列表搜索条件  
<s:form name="cxFrm" id="cxFrm" action="sysMes!findAllUserInfo.action" method="post"></s:form> --%>
             
 <table  width="623" height="20" border="0" cellpadding="0" cellspacing="0" >
                  <tr>
                  	 <td width="77" align="left"><span class="STYLE16">姓&nbsp;&nbsp;名：</span></td>
	                  <td width="155" align="left">
	                  		<input name="user.userName" id="userName" type="text" size="16" maxlength="20" style="border:1px solid #DBDBDB; height:20px;"  />
                    </td>
	                  
                    <td width="68" align="left">
                    	<span class="STYLE16">账&nbsp;&nbsp;号：</span></td>
                    <td width="323" align="left">
                    	<input name="user.account" id="account" type="text" size="18" maxlength="11" style="border:1px solid #DBDBDB; height:20px;" />
                    	<span class="STYLE16">&nbsp;&nbsp;账号是你的手机号码.</span>
                    </td>
                    
                  </tr>

	             <tr>
	                <td width="77" align="left"><span class="STYLE16">公&nbsp;&nbsp;司：</span></td>
                    <td width="155" align="left">
	                    	<select name="user.company.id" id="companyName" title="" style="width:125px;">
		                  	  	<option value="">请选择...</option>
			                  	<s:iterator id="companys" value="companyList" status="st">
									<option value="<s:property value="id" />" title="<s:property value="companyName" />"><s:property value="companyName" /></option>
							  	</s:iterator>
	                  		</select>
                    	
                   </td>
	                <td width="68" align="left"><span class="STYLE16">账户余额：</span> </td>
	                <td width="323">
	                    	<input name="accBalBegin" id="accBalBegin" type="text" size="12" maxlength="11" style="border:1px solid #DBDBDB; height:20px;" />&nbsp;元&nbsp;
	                    	—&nbsp;&nbsp;<input name="accBalEnd" id="accBalEnd" type="text" size="12" maxlength="11" style="border:1px solid #DBDBDB; height:20px;" />&nbsp;元
                   </td>
	             </tr>

                	<tr>
                    <td width="77" align="left">
                    	<span class="STYLE16">用户属性：</span></td>
                    <td width="155" align="left">
                    	<select name="user.type" id="type" style="width:125px;">
		                  	  <option value="">请选择...</option>
							  <option value="0" title="普通用户">普通用户</option>
							  <option value="1" title="vip用户">vip用户</option>
	                  	</select>
                    </td>
                    <td width="68" align="left"><span class="STYLE16">地&nbsp;&nbsp;区：</span></td>
                    <td width="323" align="left">
                  		<s:hidden id="userProvince" name="user.province" value="" ></s:hidden>
		           		<s:hidden id="userCity" name="user.city" value="" ></s:hidden>
		           		<s:hidden id="userZone" name="user.zone" value="" ></s:hidden>
						<s:select name="province" onchange="changeProvinceHandler();" id="province" list="provinces" headerKey="0" style="width:30%;" headerValue="请选择..." listValue="name" listKey="id" > </s:select>
						省
						<s:select list="#{0:'请选择...'}" id="city" name="city" onchange="changeCityHandler();" style="width:20%;" ></s:select>
						市
						<s:select list="#{0:'请选择...'}" id="area" name="area" style="width:20%;" ></s:select>
						区
                  		
                    </td>
                  </tr>

                	<tr>
	                    <td width="77" align="right"></td>
	                    <td width="155" align="left"><span style="color: red;" id="errorSpan"></span></td>
	
	                    <td width="68">搜索 &nbsp;&gt;&gt;&nbsp;&nbsp;</td>
	                    <td width="323">
	                     	<img src="images/ck.jpg" onClick="javascript:serachInfoSubmit();" style="cursor:hand" width="42" height="21">
	                    </td>
                  </tr>
                
    </table>     
	<%--End 搜索条件 --%>
	
      <table width="626" height="90" border="0" cellpadding="0" cellspacing="0">
       <%-- 标题显示 --%> 
        <tr>
          <td width="44" align="center" background="images/lm1_bg.jpg">选择</td>
          <td width="10" background="images/lm1_bg.jpg"><img src="images/line2.jpg" width="10" height="26" /></td>
          <td width="90" align="center" background="images/lm1_bg.jpg">接收者</td>
          <td width="10" background="images/lm1_bg.jpg"><img src="images/line2.jpg" width="10" height="26" /></td>
          <td width="120" align="center" background="images/lm1_bg.jpg">账号</td>
          <td width="15" align="center" background="images/lm1_bg.jpg"><img src="images/line2.jpg" width="10" height="26" /></td>
          <td width="230" align="center" background="images/lm1_bg.jpg">公司</td>
          <td width="10" align="center" background="images/lm1_bg.jpg"><img src="images/line2.jpg" width="10" height="26" /></td>
          <td width="125" align="center" background="images/lm1_bg.jpg">用户属性</td>
          <td width="10" background="images/lm1_bg.jpg"><img src="images/line2.jpg" width="10" height="25" /></td>
          <td width="335" height="32" align="center" background="images/lm1_bg.jpg">地&nbsp;&nbsp;区</td>
          
          <td width="10" background="images/lm1_bg.jpg"><img src="images/line2.jpg" width="10" height="25" /></td>
          <td width="180" height="32" align="center" background="images/lm1_bg.jpg">账户余额</td>    
              
        </tr>
       
        <%-- 显示数据的列表 --%>
        <s:iterator value="pageUserObj.data" id="userObj" status="st">
        <tr <s:if test="#st.odd">style='background-color:#F7F7F7'</s:if>>
          <td height="28" align="center">
          	<input type="checkbox" name="chbox" id="chbox" value="<s:property value="pageUserObj.data[#st.index].id"/>">
          </td>
          <td>&nbsp;</td>
          <td align="center"><s:property value="pageUserObj.data[#st.index].userName"/></td>
          <td align="center">&nbsp;</td>
          <td align="center"><s:property value="pageUserObj.data[#st.index].account"/></td>
          <td align="center">&nbsp;</td>
          <td align="center"><s:property value="pageUserObj.data[#st.index].company.companyName" /></td>
          <td align="center">&nbsp;</td>
          <td align="center">
          	<s:if test="pageUserObj.data[#st.index].type == 0">普通用户</s:if>
	        <s:else>VIP用户</s:else>
	      </td>
	      <td>&nbsp;</td>
	      <td align="center">
	            <s:property value="pageUserObj.data[#st.index].province"/>
	             <s:if test='#userObj.city != null && #userObj.city != ""'>
	              			-&nbsp;<s:property value="pageUserObj.data[#st.index].city"/>
	             </s:if>
	             <s:if test='#userObj.zone != null && #userObj.zone != ""'>
	              			-&nbsp;<s:property value="pageUserObj.data[#st.index].zone"/>
	             </s:if>	
	       </td>
         
           <td>&nbsp;</td>
	       <td align="center">
	            &nbsp;￥<s:property value="pageUserObj.data[#st.index].balance"/>
	           </A>
	              		
	       </td>
        </tr>
        </s:iterator>
         <%-- 展示列表结束 --%>      
           
        <tr>
          <td height="29" colspan="13" align="center" background="images/lm1_bg.jpg" >
          
          <!-- 分页 -->
<table width="626" border="0" cellspacing="0" cellpadding="0">
   <s:if test="pageUserObj.data != null">
        <s:if test="pageUserObj.hasOnePage==false">
			<s:form action="sysMes!findAllUserInfo.action" method="get" id="sysMsgfrm" name="sysMsgfrm">
            <tr>
              <td width="42" height="22" align="left">&nbsp;&nbsp;<input type="checkbox" name="allchk" id="allqxChk" onclick="javascript:quanXuanChk();" ></td>
              <td width="42">全选</td>
              <td width="66">&nbsp;
              <%-- 
              <img src="images/sc2.jpg" style="cursor:hand" width="66" height="19" onClick="javascript:delChkSubmit();">--%>
              </td>
              <td width="106">&nbsp;</td>
              <td width="509" align="right">
              
              <s:if test="pageUserObj.pageNo==1">首页</s:if>
			  <s:else>
				  <a href="sysMes!findAllUserInfo.action?pageNo=1" class="STYLE5">首页</a> 
			  </s:else>&nbsp;
              
              <s:if test="pageUserObj.hasPrePage==false">上一页</s:if>
			  <s:else> 
				 <a href="sysMes!findAllUserInfo.action?pageNo=<s:property value="pageUserObj.pageNo-1"/>" class="STYLE5">上一页</a>
			  </s:else>&nbsp;

              <s:if test="pageUserObj.hasNextPage==false">下一页</s:if>
		      <s:else>
				 <a href="sysMes!findAllUserInfo.action?pageNo=<s:property value="pageUserObj.pageNo+1"/>" class="STYLE5">下一页</a>
			  </s:else>&nbsp;
              
              <s:if test="pageUserObj.pageNo==pageUserObj.totalPage">末页</s:if>
			  <s:else>
			    <a href="sysMes!findAllUserInfo.action?pageNo=<s:property value="pageUserObj.totalPage"/>" class="STYLE5"> 末页 </a>
			  </s:else>
              
              &nbsp;&nbsp;第${pageUserObj.pageNo}页&nbsp;|&nbsp;
                                    共<s:property value="pageUserObj.totalPage"/>页&nbsp;|&nbsp;
                                    共${pageUserObj.totalRecord}条&nbsp;&nbsp;转至&nbsp;
    			<select onchange="changePage(this.value)" id="pageNo" name="pageNo">
    				<s:iterator value="pageUserObj.listNum" id="msgid" status="st">
    					<option value="<s:property value="pageUserObj.listNum[#st.index]"/>"><s:property value="pageUserObj.listNum[#st.index]"/></option>
    				</s:iterator>
    			</select>&nbsp;&nbsp;
                
              </td>
            </tr>
            </s:form>
         </s:if>
         <s:else>
            	<tr>
	              <td height="29" align="right" colspan="13" background="images/lm1_bg.jpg" >
				 	首页&nbsp;上一页&nbsp;下一页&nbsp;末页           
	              	&nbsp;&nbsp;第1页&nbsp;|&nbsp;共1页&nbsp;|&nbsp;&nbsp;
	    		  </td>
	            </tr>
         </s:else>
            
   </s:if>
   <s:else>
          <tr>
		      <td height="29" align="center" colspan="13" background="images/lm1_bg.jpg" >
				<p style="color: red;font-size: 12px;text-align: center;">暂无用户记录!</p>
		      </td>
		  </tr>	 
  </s:else>	 
  <%-- 分页结束 --%>
</table>
                      
          </td>
        </tr>
        <tr>
          <td height="25" colspan="13" align="right" class="STYLE15">&nbsp;</td>
        </tr>
      </table>

</div>
   </td>
 </tr>
</table>


</s:form>

</div>



</body>

<script type="text/javascript">
var flagDis = false;
var flag = document.getElementById("flgDivDisp").value;
//搜索查询
function searchSubmit(){
  // window.location.href="sysMes!findAllUserInfo.action";
  document.getElementById("userListMain").style.display = "block"; //显示用户列表
}
ycUserListDiv();
function ycUserListDiv(){
//alert("flag="+flag);
	if(flag != 1 || flag == ""){
		document.getElementById("userListMain").style.display = "none"; //不显示用户列表
	}else{
		document.getElementById("userListMain").style.display = "block"; //显示用户列表
	}
}
</script>

</html>
